package spring.lottery.server.exceptionCode;

import lombok.Data;
import lombok.Getter;
import spring.lottery.common.exceptionCode.ExceptionCodeModel;

//定义错误码
@Getter
public class ServerConstantCode {

    //login
    public static final ExceptionCodeModel EMAIL_FORMAT_ERROR = new ExceptionCodeModel(101, "邮箱格式错误 邮箱：xxx@xx.xxx(形如：abc@qq.com)");
    public static final ExceptionCodeModel PASSWORD_FORMAT_ERROR = new ExceptionCodeModel(102, "密码格式错误 需要6-12位");
    public static final ExceptionCodeModel PHONE_FORMAT_ERROR = new ExceptionCodeModel(103, "电话号码格式错误，手机号码以1开头的11位数字");
    public static final ExceptionCodeModel UP_INCORRECT = new ExceptionCodeModel(104, "密码或者账号错误");
    public static final ExceptionCodeModel PHONE_EXIST_ERROR = new ExceptionCodeModel(105, "电话号码已被注册");
    public static final ExceptionCodeModel EMAIL_EXIST_ERROR = new ExceptionCodeModel(106, "email已经被注册了");
    public static final ExceptionCodeModel LOGIN_ERROR = new ExceptionCodeModel(107, "登录参数异常");
    public static final ExceptionCodeModel IDENTITY_FORMAT_ERROR = new ExceptionCodeModel(108, "用户身份格式错误");
    public static final ExceptionCodeModel USERNAME_CONTAINS_SPACE = new ExceptionCodeModel(109,"用户名不能有空格");

    //activity
    public static final ExceptionCodeModel SAVE_IMG_REE = new ExceptionCodeModel(201, "保存图片失败");
    public static final ExceptionCodeModel ACTIVITY_NOT_EXIST = new ExceptionCodeModel(202, "活动不存在");
    public static final ExceptionCodeModel ACTIVITY_IS_COMPLETED = new ExceptionCodeModel(203, "活动已经结束");
    public static final ExceptionCodeModel PRIZE_NOT_EXIST = new ExceptionCodeModel(204, "奖品不存在");
    public static final ExceptionCodeModel PRIZE_IS_EXTRACTED = new ExceptionCodeModel(205, "奖品已经被抽完了");
    public static final ExceptionCodeModel USER_NOT_EXIST = new ExceptionCodeModel(206, "人员信息不存在");
    public static final ExceptionCodeModel USER_PRIZES_MISMATCH = new ExceptionCodeModel(207, "中奖人数和奖品数量不匹配");
    public static final ExceptionCodeModel USER_IS_WINNER = new ExceptionCodeModel(208, "该人员已经中奖");
    public static final ExceptionCodeModel USERS_MORE_THAN_PRIZE = new ExceptionCodeModel(209, "人员的数量小于奖品的数量");
    public static final ExceptionCodeModel PRIZE_NAME_CONTAINS_SPACE = new ExceptionCodeModel(210,"奖品名字不能能有空格");
    public static final ExceptionCodeModel ACTIVITY_CONTAINS_SPACE = new ExceptionCodeModel(211,"活动名字不能有空格");


    //email
    public static final ExceptionCodeModel EMAIL_ERROR = new ExceptionCodeModel(301, "邮箱输入错误,没有验证码");
    public static final ExceptionCodeModel EMAIL_VERIFY_ERROR = new ExceptionCodeModel(302, "验证码校验错误");


    //扭转活动错误
    public static final ExceptionCodeModel CONVERT_STATUS_ERROR = new ExceptionCodeModel(401, "扭转活动失败");

    //查库出现了错误

}
